<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var move = false
        var i = 0
        var timer
        document.onmousemove = () => {
            if (move == false) {
                move = true
                clearTimeout(timer)
                console.log("i")
                timer = setTimeout(() => {
                    move = false
                }, 1000)
            }
        }
    </script>
</body>

</html>